1000
It is possible to search for an item ( inside the Editor ), case insensitive

local var_Editor as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("DropDownList")}:Editor
	var_Editor:EditType := DropDownListType
	var_Editor:AddItem(1,"One",nil)
	var_Editor:AddItem(2,"Two",nil)
	var_Editor:AddItem(3,"Three",nil)
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem(oDCOCX_Exontrol1:Columns:[Item,0]:Editor:[FindItem,">ONE"])
	var_Items:AddItem(oDCOCX_Exontrol1:Columns:[Item,0]:Editor:[FindItem,">ThRee"])
	var_Items:AddItem(oDCOCX_Exontrol1:Columns:[Item,0]:Editor:[FindItem,"ONE"])
	var_Items:AddItem(oDCOCX_Exontrol1:Columns:[Item,0]:Editor:[FindItem,">tWo"])
oDCOCX_Exontrol1:EndUpdate()

999
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exHLines
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Default")}
	var_Column:[Def,exCellValueFormat] := 1
	var_Column:[Def,exCellSingleLine] := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("This is the first line.<br>This is the second line.")
	var_Items:AddItem("This is the first line.<br>This is the second line.")
	var_Items:AddItem("This is the first line.<br>This is the second line.")
oDCOCX_Exontrol1:EndUpdate()

998
The text after the BR-tag is in same line as the text before the BR-tag (individual)

local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exHLines
oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValueFormat,var_Items:AddItem("This is the first line.<br>This is the second line."),0] := exHTML
	h := var_Items:AddItem("<b>This is the first line.<br>This is the second line.</b>")
	var_Items:[CellValueFormat,h,0] := exHTML
	var_Items:[CellSingleLine,h,0] := exCaptionWordWrap
	var_Items:[CellValueFormat,var_Items:AddItem("This is the first line.<br>This is the second line."),0] := exHTML
oDCOCX_Exontrol1:EndUpdate()

997
Can I disable an item once the user selects a new value into a different item

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
	// Change event - Occurs when the user changes the cell's content.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[EnableItem,var_Items:[ItemByIndex,1]] := false
RETURN NIL

local var_Editor as IEditor
local var_Items as IItems
local h1,h2 as USUAL

oDCOCX_Exontrol1:FreezeEvents(true)
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:Columns:Add("Q")
oDCOCX_Exontrol1:Columns:Add("A")
var_Items := oDCOCX_Exontrol1:Items
	h1 := var_Items:AddItem("What's your gender?")
	var_Editor := var_Items:[CellEditor,h1,1]
		var_Editor:EditType := DropDownListType
		var_Editor:AddItem(1,"Male",nil)
		var_Editor:AddItem(0,"Female",nil)
	var_Items:[CellValue,h1,1] := 1
	h2 := var_Items:AddItem("What's pet name?")
	var_Items:[CellValue,h2,1] := "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	var_Items:[CellSingleLine,h2,1] := exCaptionWordWrap
oDCOCX_Exontrol1:EndUpdate()
oDCOCX_Exontrol1:FreezeEvents(false)

996
How can I get a row expanded / enlarged to fit the cell's text (entire column)

local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
local h1,h2 as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:Columns:Add("Q")
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("A")}
	var_Column:[Def,exCellSingleLine] := false
	var_Editor := var_Column:Editor
		var_Editor:EditType := MemoType
		var_Editor:Appearance := SingleApp
var_Items := oDCOCX_Exontrol1:Items
	h1 := var_Items:AddItem("What's name?")
	var_Items:[CellValue,h1,1] := "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	h2 := var_Items:AddItem("What's your pet name?")
	var_Items:[CellValue,h2,1] := "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
oDCOCX_Exontrol1:EndUpdate()

995
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

local var_Editor as IEditor
local var_Items as IItems
local h1,h2 as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:Columns:Add("Q")
oDCOCX_Exontrol1:Columns:Add("A")
var_Items := oDCOCX_Exontrol1:Items
	h1 := var_Items:AddItem("What's name?")
	var_Items:[CellValue,h1,1] := "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	h2 := var_Items:AddItem("What's your pet name?")
	var_Editor := var_Items:[CellEditor,h2,1]
		var_Editor:EditType := MemoType
		var_Editor:Appearance := SingleApp
	var_Items:[CellValue,h2,1] := "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	var_Items:[CellSingleLine,h2,1] := exCaptionWordWrap
oDCOCX_Exontrol1:EndUpdate()

994
InsertControlItem / UserEditor / A2X:

local var_Items as IItems
local h,hX as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:BackColor := RGB(240,240,240)
oDCOCX_Exontrol1:ConditionalFormats:Add("1 = 1",nil):Bold := true
IColumn{oDCOCX_Exontrol1:Columns:Add("Type")}:Alignment := RightAlignment
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("1. A ProgID such as " + CHR(34) + "MSCAL.Calendar.7" + CHR(34) + "")
	var_Items:[ItemDivider,h] := 0
	hX := var_Items:InsertControlItem(0,"MSCAL.Calendar","")
	// Generate Source for 'Microsoft Calendar Control 2007(MSCAL.OCX)' server from Tools\Automation Server...
	ICalendar{var_Items:[ItemObject,hX]}:BackColor := RGB(255,255,255)
	h := var_Items:AddItem("2. A CLSID such as " + CHR(34) + "{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}" + CHR(34) + "")
	var_Items:[ItemDivider,h] := 0
	hX := var_Items:InsertControlItem(0,"{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}","")
	h := var_Items:AddItem("3. A URL such as " + CHR(34) + "http://www.exontrol.com" + CHR(34) + "")
	var_Items:[ItemDivider,h] := 0
	hX := var_Items:InsertControlItem(0,"http://www.exontrol.com","")
	h := var_Items:AddItem("4. A reference to an Active document such as " + CHR(34) + "file://\\Documents\MyDoc.doc" + CHR(34) + "")
	var_Items:[ItemDivider,h] := 0
	hX := var_Items:InsertControlItem(0,"file://C:\empesting.xml","")
	h := var_Items:AddItem("5.A fragment of HTML such as " + CHR(34) + "MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>" + CHR(34) + "")
	var_Items:[ItemDivider,h] := 0
	hX := var_Items:InsertControlItem(0,"MSHTML:<HTML><BODY>This is a <b>line of</b> text</BODY></HTML>","")
	var_Items:[ItemHeight,hX] := 56
	h := var_Items:AddItem("6.Anything, if it is preffixed by " + CHR(34) + "A2X:" + CHR(34) + "")
	var_Items:[ItemDivider,h] := 0
	hX := var_Items:InsertControlItem(0,"A2X:TOC24.Toc24Ctrl.1","")
oDCOCX_Exontrol1:EndUpdate()

993
How do I add a RichTextBox editor
METHOD OCX_Exontrol1UserEditorOleEvent(Object,Ev,CloseEditor,Item,ColIndex) CLASS MainDialog
	// UserEditorOleEvent event - Occurs when an user editor fires an event.
	OutputDebugString(String2Psz( AsString(Ev) ))
RETURN NIL

local var_Editor as IEditor
local var_Items as IItems
local var_RichTextBox as IRichText

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:DefaultItemHeight := 32
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("RICHTEXT")}:Editor
	var_Editor:EditType := UserEditorType
	var_Editor:UserEditor("RICHTEXT.RichtextCtrl","")
	// Generate Source for 'Microsoft Rich Textbox Control 6.0 (SP4)(richtx32.ocx)' server from Tools\Automation Server...
	var_RichTextBox := IRichText{var_Editor:UserEditorObject}
		var_RichTextBox:AutoVerbMenu := true
		var_RichTextBox:TextRTF := "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard\r\nThis is some {\b bold} text.\par\r\n}"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("RICHTEXT.RichtextCtrl")
oDCOCX_Exontrol1:EndUpdate()

992
Is it possible to trap a double-click event on a specific cell and when that happens, to set the cell to a specific value
METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog
	// DblClick event - Occurs when the user dblclk the left mouse button over an object.
	local h as USUAL
	h := oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Items:[CellValue,h,c]) ))
RETURN NIL

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HeaderAppearance := Etched
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:Columns:Add("C1")
oDCOCX_Exontrol1:Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("Item 1"),1] := "Item 2"
	var_Items:[CellValue,var_Items:AddItem("Item 3"),1] := "Item 4"
	var_Items:[CellValue,var_Items:AddItem("Item 5"),1] := "Item 6"
oDCOCX_Exontrol1:EndUpdate()

991
How can I display dates in DD/MM/YYYY format

local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ScrollBySingleLine := false
oDCOCX_Exontrol1:Columns:Add("Date")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[ItemDivider,var_Items:AddItem("Different Date Formats")] := 0
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "((shortdateF(value) mid 4) left 2) + `/` + (shortdateF (value) left 2) + `/` + (shortdateF (value) right 4)"
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "(1 array (0:=(shortdateF(value) split `/`))) + `/` + (0 array (=:0) ) + `/` + (2 array (=:0) )"
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "((`0` + day(value) ) right 2) + `/` + ((`0` + month(value) ) right 2) + `/` + year(value)"
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "day(value) + `/` + month(value) + `/` + year(value)"
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "year(value) + ` - ` + day(value) + ` - ` + month(value)"
	h := var_Items:AddItem(SToD("19711201"))
	var_Items:[ItemHeight,h] := 24
	var_Items:[CellValueFormat,h,0] := exHTML
	var_Items:[FormatCell,h,0] := "`<b>` + year(value) + `</b><off -4> ` + day(value) + ` - ` + month(value)"
	var_Items:[ItemDivider,var_Items:AddItem("Predefined Date Formats")] := 0
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "value"
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "shortdateF(value)"
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "shortdate(value)"
	var_Items:[FormatCell,var_Items:AddItem(SToD("19711201")),0] := "longdate(value)"
oDCOCX_Exontrol1:EndUpdate()

990
I have noticed that the column gets resized once I release the mouse. I have a column that displays multiple-lines cells, and the text gets wrapped only when user releases the mouse. Is it possible to get resized contiguously as I had before

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ScrollBySingleLine := false
oDCOCX_Exontrol1:DrawGridLines := exVLines
oDCOCX_Exontrol1:ColumnsAllowSizing := true
IColumn{oDCOCX_Exontrol1:Columns:Add("Column A (cont)")}:[Def,exColumnResizeContiguously] := true
oDCOCX_Exontrol1:Columns:Add("Column 1")
IColumn{oDCOCX_Exontrol1:Columns:Add("Column B (cont)")}:[Def,exColumnResizeContiguously] := true
oDCOCX_Exontrol1:Columns:Add("Column 2")
oDCOCX_Exontrol1:EndUpdate()

989
How do I get the column from cursor, when it hovers the empty portion of the items section
METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
	// MouseMove event - Occurs when the user moves the mouse.
	local i as USUAL
	i := oDCOCX_Exontrol1:[ItemFromPoint,0,-1,c,hit]
	OutputDebugString(String2Psz( "Column" ))
	OutputDebugString(String2Psz( AsString(c) ))
RETURN NIL


oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exVLines
oDCOCX_Exontrol1:Columns:Add("Column 0")
oDCOCX_Exontrol1:Columns:Add("Column 1")
oDCOCX_Exontrol1:Columns:Add("Column 2")
oDCOCX_Exontrol1:EndUpdate()

988
How do I add items once the user clicks the empty area
METHOD OCX_Exontrol1Click() CLASS MainDialog
	// Click event - Occurs when the user presses and then releases the left mouse button over the grid control.
	local var_Items as IItems
	local i as USUAL
	i := oDCOCX_Exontrol1:[ItemFromPoint,0,-1,c,hit]
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[CellValue,var_Items:AddItem(i),1] := c
RETURN NIL


oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Number of Items to Add")
oDCOCX_Exontrol1:Columns:Add("Click on Column")
oDCOCX_Exontrol1:EndUpdate()

987
Is there any option to stop events
METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	OutputDebugString(String2Psz( "AddItem event is fired only if FreezeEvents(False) is called" ))
RETURN NIL

local var_Items as IItems
local h1,h2 as USUAL

oDCOCX_Exontrol1:FreezeEvents(true)
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 24
oDCOCX_Exontrol1:Columns:Add("Task")
var_Items := oDCOCX_Exontrol1:Items
	h1 := var_Items:AddItem("Task 1")
	h2 := var_Items:AddItem("Task 2")
oDCOCX_Exontrol1:EndUpdate()
oDCOCX_Exontrol1:FreezeEvents(false)

986
How can I include the child items, when a filter is applied

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:Indent := 16
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptPattern := "Nancy"
oDCOCX_Exontrol1:FilterInclude := exItemsWithChilds
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Name")}:Width := 96
	IColumn{var_Columns:Add("Title")}:Width := 96
	var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
	h0 := var_Items:AddItem("Nancy Davolio")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "Seattle"
	h0 := var_Items:InsertItem(h0,nil,"Andrew Fuller")
	var_Items:[CellValue,h0,1] := "Vice President, Sales"
	var_Items:[CellValue,h0,2] := "Tacoma"
	h0 := var_Items:InsertItem(h0,nil,"Michael Suyama")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "London"
	h0 := var_Items:AddItem("Janet Leverling")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "Kirkland"
	h0 := var_Items:InsertItem(h0,nil,"Margaret Peacock")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "Redmond"
	var_Items:[ExpandItem,0] := true
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()

985
How do I prevent changing the cell's state ( check-box state )
METHOD OCX_Exontrol1CellStateChanging(Item,ColIndex,NewState) CLASS MainDialog
	// CellStateChanging event - Fired before cell's state is about to be changed.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		NewState := var_Items:[CellState,Item,ColIndex]
RETURN NIL

local var_Column,var_Column1 as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("P1")}
	var_Column:[Def,exCellHasCheckBox] := true
	var_Column:PartialCheck := true
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("P2")}
	var_Column1:[Def,exCellHasCheckBox] := true
	var_Column1:PartialCheck := true
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()

984
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

local var_Column,var_Column1,var_Column2,var_Column3,var_Column4 as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Date")}
	var_Column:SortType := SortDate
	var_Column:DisplayFilterButton := true
	var_Column:DisplayFilterPattern := false
	var_Column:DisplayFilterDate := true
	var_Column:FilterList := exShowFocusItem | exShowCheckBox | exSortItemsDesc
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("DateTime")}
	var_Column1:SortType := SortDateTime
	var_Column1:DisplayFilterButton := true
	var_Column1:DisplayFilterPattern := false
	var_Column1:FilterList := exShowFocusItem | exShowCheckBox | exSortItemsDesc
var_Column2 := IColumn{oDCOCX_Exontrol1:Columns:Add("Time")}
	var_Column2:SortType := SortTime
	var_Column2:DisplayFilterButton := true
	var_Column2:DisplayFilterPattern := false
	var_Column2:FilterList := exShowFocusItem | exShowCheckBox | exSortItemsDesc
	var_Column2:FormatColumn := "time(value)"
var_Column3 := IColumn{oDCOCX_Exontrol1:Columns:Add("Numeric")}
	var_Column3:SortType := SortNumeric
	var_Column3:DisplayFilterButton := true
	var_Column3:FilterList := exShowFocusItem | exShowCheckBox | exSortItemsDesc
var_Column4 := IColumn{oDCOCX_Exontrol1:Columns:Add("String")}
	var_Column4:DisplayFilterButton := true
	var_Column4:FilterList := exShowFocusItem | exShowCheckBox | exSortItemsDesc
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem(SToD("20100127"))
	var_Items:[CellValue,h,1] := SToD("20100127 10:00:00")
	var_Items:[CellValue,h,2] := var_Items:[CellValue,h,1]
	var_Items:[CellValue,h,3] := 1
	var_Items:[CellValue,h,4] := var_Items:[CellValue,h,3]
	h := var_Items:AddItem(SToD("20110127"))
	var_Items:[CellValue,h,1] := SToD("20110127 09:00:00")
	var_Items:[CellValue,h,2] := var_Items:[CellValue,h,1]
	var_Items:[CellValue,h,3] := 11
	var_Items:[CellValue,h,4] := var_Items:[CellValue,h,3]
	h := var_Items:AddItem(SToD("20101102"))
	var_Items:[CellValue,h,1] := SToD("20101102 09:00:00")
	var_Items:[CellValue,h,2] := var_Items:[CellValue,h,1]
	var_Items:[CellValue,h,3] := 2
	var_Items:[CellValue,h,4] := var_Items:[CellValue,h,3]
oDCOCX_Exontrol1:Columns:[Item,"DateTime"]:DisplayFilterDate := false
oDCOCX_Exontrol1:EndUpdate()

983
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

local var_Column,var_Column1 as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("P1")}
	var_Column:[Def,exCellHasCheckBox] := true
	var_Column:PartialCheck := true
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("P2")}
	var_Column1:[Def,exCellHasCheckBox] := true
	var_Column1:PartialCheck := true
	var_Column1:FormatColumn := "1 index ``"
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child A")
	var_Items:InsertItem(h,nil,"Child B")
	var_Items:InsertItem(h,nil,"Child A")
	var_Items:InsertItem(h,nil,"Child B")
	var_Items:AddItem("Root")
	var_Items:AddItem("Root")
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:Layout := "multiplesort=" + CHR(34) + "C0:1 C1:2" + CHR(34) + ";collapse=" + CHR(34) + "" + CHR(34) + ""
oDCOCX_Exontrol1:EndUpdate()

982
How do I find the cell's type, or what the cell holds

local var_Columns as IColumns
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exRowLines
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Value")}:Width := 24
	IColumn{var_Columns:Add("Type")}:FormatColumn := "type(%0)"
	IColumn{var_Columns:Add("TypeAsString")}:FormatColumn := "(0 := type(%0)) array (`empty`, `null`, `short`, `long`, `float`, `double`, `currency`, `date`, `string`, `object`, `error`, `boolean`, `variant`, `any`, `reserved`, `decimal`, `char`, `byte`, `unsigned short`, `unsigned long`, `long on 64 bits`)"
	IColumn{var_Columns:Add("Length")}:FormatColumn := "len(%0)"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem(nil)
	var_Items:AddItem("")
	var_Items:[CellValue,:AddItem(nil),0] := oDCOCX_Exontrol1
	var_Items:[CellValue,var_Items:AddItem(nil),0] := true
	var_Items:[CellValue,var_Items:AddItem(nil),0] := -1
	var_Items:[CellValue,var_Items:AddItem(nil),0] := -1
	var_Items:[CellValue,var_Items:AddItem(nil),0] := SToD("20010101")
oDCOCX_Exontrol1:EndUpdate()

981
How can I get ride / hide the image being dragged by OLE Drag and Drop
METHOD OCX_Exontrol1OLEStartDrag(Data,AllowedEffects) CLASS MainDialog
	// OLEStartDrag event - Occurs when the OLEDrag method is called.
	// Data.SetData("data to drag")
	AllowedEffects := 1
RETURN NIL

local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:OLEDropMode := exOLEDropManual
oDCOCX_Exontrol1:[Background,exDragDropAfter] := RGB(255,255,255)
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true

980
The ReadOnly property does not prevent changing the column's check-box (sample 2)

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ShowFocusRect := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("C1")}
	var_Column:AllowSizing := false
	var_Column:Width := 18
	var_Column:Editor:EditType := CheckValueType
oDCOCX_Exontrol1:Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem(0),1] := "Item 1"
	var_Items:[CellValue,var_Items:AddItem(-1),1] := "Item 2"
	var_Items:[CellValue,var_Items:AddItem(0),1] := "Item 3"
oDCOCX_Exontrol1:ReadOnly := exReadOnly
oDCOCX_Exontrol1:Columns:[Item,0]:Editor:[Option,exCheckValue2] := 2
oDCOCX_Exontrol1:EndUpdate()

979
The ReadOnly property does not prevent changing the column's check-box (sample 1)

local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ShowFocusRect := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("C1")}
	var_Column:AllowSizing := false
	var_Column:Width := 18
	var_Editor := var_Column:Editor
		var_Editor:EditType := CheckValueType
		var_Editor:[Option,exCheckValue2] := 1
oDCOCX_Exontrol1:Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem(0),1] := "Item 1"
	var_Items:[CellValue,var_Items:AddItem(-1),1] := "Item 2"
	var_Items:[CellValue,var_Items:AddItem(0),1] := "Item 3"
oDCOCX_Exontrol1:ReadOnly := exReadOnly
oDCOCX_Exontrol1:EndUpdate()

978
How can I export checked items only

local var_Columns as IColumns
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("C1")}:[Def,exCellHasCheckBox] := true
	IColumn{var_Columns:Add("C2")}:FormatColumn := "1 index `A-Z`"
	IColumn{var_Columns:Add("C3")}:FormatColumn := "100 index ``"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:[CellState,var_Items:AddItem("Item 2"),nil] := 1
	var_Items:[CellState,var_Items:AddItem("Item 3"),nil] := 1
oDCOCX_Exontrol1:EndUpdate()
OutputDebugString(String2Psz( "Export CSV Checked Items Only:" ))
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Export("","chk")) ))

977
How can I export a hidden column

local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("C1")
	var_Column := IColumn{var_Columns:Add("C2")}
		var_Column:FormatColumn := "1 index `A-Z`"
		var_Column:Visible := false
	var_Column1 := IColumn{var_Columns:Add("C3")}
		var_Column1:FormatColumn := "100 index ``"
		var_Column1:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:AddItem("Item 2")
	var_Items:AddItem("Item 3")
oDCOCX_Exontrol1:EndUpdate()
OutputDebugString(String2Psz( "Export CSV Hidden Columns (1,2):" ))
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Export("","|1,2")) ))

976
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h,hChild as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:AutoDrag := exAutoDragPositionAny
oDCOCX_Exontrol1:HasLines := exSolidLine
oDCOCX_Exontrol1:Indent := 16
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("")}
		var_Column:[Def,exCellValueFormat] := 1
		var_Column:FormatColumn := "((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value"
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child")
	hChild := var_Items:InsertItem(h,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(h,nil,"Child")
	var_Items:[ExpandItem,0] := true
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child")
	hChild := var_Items:InsertItem(h,nil,"Child")
	var_Items:[CellState,hChild,0] := 1
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(h,nil,"Child")
oDCOCX_Exontrol1:EndUpdate()

975
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h,hChild as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:GridLineColor := RGB(190,190,190)
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:AutoDrag := exAutoDragPositionAny
oDCOCX_Exontrol1:HasLines := exSolidLine
oDCOCX_Exontrol1:Indent := 16
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Default")
	var_Column := IColumn{var_Columns:Add("")}
		var_Column:[Def,exCellValueFormat] := 1
		var_Column:[Def,exCellPaddingRight] := 4
		var_Column:AllowSizing := false
		var_Column:Width := 36
		var_Column:Position := 0
		var_Column:FormatColumn := "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:1) ) "
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child")
	hChild := var_Items:InsertItem(h,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(h,nil,"Child")
	var_Items:[ExpandItem,0] := true
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child")
	hChild := var_Items:InsertItem(h,nil,"Child")
	var_Items:[CellState,hChild,0] := 1
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(h,nil,"Child")
oDCOCX_Exontrol1:EndUpdate()

974
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h,hChild as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:AutoDrag := exAutoDragPositionAny
oDCOCX_Exontrol1:HasLines := exSolidLine
oDCOCX_Exontrol1:Indent := 16
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Default")
	var_Column := IColumn{var_Columns:Add("")}
		var_Column:[Def,exCellValueFormat] := 1
		var_Column:[Def,exCellPaddingRight] := 4
		var_Column:Alignment := RightAlignment
		var_Column:AllowSizing := false
		var_Column:Width := 24
		var_Column:Position := 0
		var_Column:FormatColumn := "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) "
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child")
	hChild := var_Items:InsertItem(h,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(h,nil,"Child")
	var_Items:[ExpandItem,0] := true
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child")
	hChild := var_Items:InsertItem(h,nil,"Child")
	var_Items:[CellState,hChild,0] := 1
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(hChild,nil,"Child")
	var_Items:InsertItem(h,nil,"Child")
oDCOCX_Exontrol1:EndUpdate()

973
How can I programmatically group by columns, without having the control's sort bar visible

local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SortBarHeight := 0
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Layout := "multiplesort=" + CHR(34) + "C1:2" + CHR(34) + ""
oDCOCX_Exontrol1:EndUpdate()

972
How do I perform my own sort

METHOD OCX_Exontrol1Sort() CLASS MainDialog
	// Sort event - Fired when the control sorts a column.
	local var_Items as IItems
	OutputDebugString(String2Psz( "Sort" ))
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[ItemPosition,var_Items:[ItemByIndex,1]] := 0
		var_Items:[ItemPosition,var_Items:[ItemByIndex,0]] := 1
RETURN NIL

local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:SortOnClick := exUserSort
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Index")}:FormatColumn := "0 index ``"
	var_Columns:Add("Data 1")
	var_Columns:Add("Data 2")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := 2
	var_Items:[CellValue,h,2] := 3
	h := var_Items:AddItem(4)
	var_Items:[CellValue,h,1] := 5
	var_Items:[CellValue,h,2] := 6
	h := var_Items:AddItem(7)
	var_Items:[CellValue,h,1] := 8
	var_Items:[CellValue,h,2] := 9
oDCOCX_Exontrol1:Layout := "multiplesort=" + CHR(34) + "C1:1 C2:2" + CHR(34) + ""
oDCOCX_Exontrol1:EndUpdate()

971
Is it possible to have a different alignment for parts of the cell's caption

local var_Column as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:DrawGridLines := exRowLines
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Default")}
	var_Column:[Def,exCellHasCheckBox] := true
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellHAlignment,var_Items:AddItem("all-left"),0] := LeftAlignment
	var_Items:[CellHAlignment,var_Items:AddItem("all-center"),0] := CenterAlignment
	var_Items:[CellHAlignment,var_Items:AddItem("all-right"),0] := RightAlignment
	h := var_Items:AddItem("left<c>center<r>right")
	var_Items:[CellValueFormat,h,0] := exHTML
oDCOCX_Exontrol1:EndUpdate()

970
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("MultipleLine")}
		var_Column:Width := 32
		var_Column:[Def,exCellSingleLine] := false
		var_Column:[Def,exColumnResizeContiguously] := true
	var_Column1 := IColumn{var_Columns:Add("SingleLine")}
		var_Column1:[Def,exCellSingleLine] := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("This is a bit of long text that should break the line"),1] := "This is a bit of long text that should break the line"
oDCOCX_Exontrol1:EndUpdate()

969
How can I get the absolute position of an item
METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
	// MouseMove event - Occurs when the user moves the mouse.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		OutputDebugString(String2Psz( var_Items:[CellCaption,oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit],"Position"] ))
RETURN NIL

local var_Column as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:BackColorAlternate := RGB(240,240,240)
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}:DisplayFilterButton := true
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(var_Items:InsertItem(h,nil,"Child 1"),nil,"Sub-Child 1")
	var_Items:InsertItem(var_Items:InsertItem(h,nil,"Child 2"),nil,"Sub-Child 2")
oDCOCX_Exontrol1:PutItems(oDCOCX_Exontrol1:GetItems(-1),nil)
oDCOCX_Exontrol1:PutItems(oDCOCX_Exontrol1:GetItems(-1),nil)
oDCOCX_Exontrol1:PutItems(oDCOCX_Exontrol1:GetItems(-1),nil)
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column:FormatColumn := "1 apos ``"
	var_Column:Visible := false
oDCOCX_Exontrol1:EndUpdate()

968
I am using ExComboBox as an user editor, how can I display a different column

METHOD OCX_Exontrol1UserEditorClose(Object,Item,ColIndex) CLASS MainDialog
	// UserEditorClose event - Fired the user editor is about to be opened.
	// Items.CellValue(Item,ColIndex) = Object.Value

RETURN NIL

METHOD OCX_Exontrol1UserEditorOleEvent(Object,Ev,CloseEditor,Item,ColIndex) CLASS MainDialog
	// UserEditorOleEvent event - Occurs when an user editor fires an event.
	OutputDebugString(String2Psz( AsString(Ev) ))
RETURN NIL

METHOD OCX_Exontrol1UserEditorOpen(Object,Item,ColIndex) CLASS MainDialog
	// UserEditorOpen event - Occurs when an user editor is about to be opened.
	// Object.Value = Me.Items.CellValue(Item,ColIndex)

RETURN NIL

local var_Editor as IEditor
local var_Items as IItems
local var_Object as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Exontrol.ComboBox")}:Editor
	var_Editor:EditType := UserEditorType
	var_Editor:UserEditor("Exontrol.ComboBox","")
	var_Object := var_Editor:UserEditorObject
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:DefaultItemHeight := 21
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellEditorVisible,var_Items:AddItem(10248),0] := exEditorVisible
	var_Items:[CellEditorVisible,var_Items:AddItem(10249),0] := exEditorVisible
	var_Items:[CellEditorVisible,var_Items:AddItem(10250),0] := exEditorVisible
oDCOCX_Exontrol1:EndUpdate()

967
How do I sort the index column as numeric (Method 3)

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[CellData,Item,1] := var_Items:[CellCaption,Item,1]
RETURN NIL

local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ShowFocusRect := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Next")}
	var_Column:[Def,exCellPaddingLeft] := 4
	var_Column:[Def,exHeaderPaddingLeft] := 4
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Index")}
	var_Column1:AllowSizing := false
	var_Column1:Width := 48
	var_Column1:FormatColumn := "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"
	var_Column1:[Def,exCellValueFormat] := 1
	var_Column1:SortType := SortUserData
	var_Column1:Position := 0
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:AddItem("Item 2")
	var_Items:AddItem("Item 3")
	var_Items:AddItem("Item 4")
	var_Items:AddItem("Item 5")
	var_Items:AddItem("Item 6")
	var_Items:AddItem("Item 7")
	var_Items:AddItem("Item 8")
	var_Items:AddItem("Item 9")
	var_Items:AddItem("Item 10")
oDCOCX_Exontrol1:EndUpdate()

966
How do I sort the index column as numeric (Method 2)

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[CellSortData,Item,1] := var_Items:[CellCaption,Item,1]
RETURN NIL

local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ShowFocusRect := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Next")}
	var_Column:[Def,exCellPaddingLeft] := 4
	var_Column:[Def,exHeaderPaddingLeft] := 4
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Index")}
	var_Column1:AllowSizing := false
	var_Column1:Width := 48
	var_Column1:FormatColumn := "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"
	var_Column1:[Def,exCellValueFormat] := 1
	var_Column1:SortType := SortCellData
	var_Column1:Position := 0
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:AddItem("Item 2")
	var_Items:AddItem("Item 3")
	var_Items:AddItem("Item 4")
	var_Items:AddItem("Item 5")
	var_Items:AddItem("Item 6")
	var_Items:AddItem("Item 7")
	var_Items:AddItem("Item 8")
	var_Items:AddItem("Item 9")
	var_Items:AddItem("Item 10")
oDCOCX_Exontrol1:EndUpdate()

965
How do I sort the index column as numeric (Method 1)

local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Sort Index As String (Default)")}
	var_Column:FormatColumn := "1 index ``"
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Sort Index As Numeric")}
	var_Column1:ComputedField := "%C0"
	var_Column1:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
oDCOCX_Exontrol1:EndUpdate()

964
How can I put icons/images into buttons

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("C+B")}
	var_Column:AllowSizing := false
	var_Column:Width := 48
	var_Column:FormatColumn := "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"
	var_Column:[Def,exCellValueFormat] := 1
	var_Column:[Def,exCellHasCheckBox] := true
	var_Column:[Def,exCellHasButton] := true
	var_Column:[Def,exCellButtonAutoWidth] := true
oDCOCX_Exontrol1:Columns:Add("")
oDCOCX_Exontrol1:DrawGridLines := exVLines
oDCOCX_Exontrol1:DefaultItemHeight := 20
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
oDCOCX_Exontrol1:EndUpdate()

963
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

METHOD OCX_Exontrol1ButtonClick(Item,ColIndex,Key) CLASS MainDialog
	// ButtonClick event - Occurs when user clicks on the cell's button.
	OutputDebugString(String2Psz( "ButtonClick" ))
	OutputDebugString(String2Psz( AsString(Item) ))
	OutputDebugString(String2Psz( AsString(Key) ))
RETURN NIL

METHOD OCX_Exontrol1CellStateChanged(Item,ColIndex) CLASS MainDialog
	// CellStateChanged event - Fired after cell's state has been changed.
	OutputDebugString(String2Psz( "CellStateChanged" ))
	OutputDebugString(String2Psz( AsString(Item) ))
RETURN NIL

local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
	var_Column:AllowSizing := false
	var_Column:Width := 32
	var_Column:FormatColumn := "1 index ``"
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}
	var_Column1:AllowSizing := false
	var_Column1:Width := 48
	var_Column1:FormatColumn := "`     `"
	var_Column1:[Def,exCellHasCheckBox] := true
	var_Column1:[Def,exCellHasButton] := true
	var_Column1:[Def,exCellButtonAutoWidth] := true
oDCOCX_Exontrol1:Columns:Add("")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
oDCOCX_Exontrol1:EndUpdate()

962
I have columns that look up the same data. (e.g. different contact) so both could / should use the same editor. Is this possible, to use other column's editor

local var_Column as IColumn
local var_Columns as IColumns
local var_Editor as IEditor
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("Pos")}
		var_Column:Width := 32
		var_Column:AllowSizing := false
		var_Column:FormatColumn := "1 index ``"
	var_Editor := var_Columns:Add("C1"):Editor
		var_Editor:EditType := ColorListType
		var_Editor:ClearItems()
		var_Editor:AddItem(255,"Red Color",nil)
		var_Editor:AddItem(16711680,"Blue Color",nil)
		var_Editor:AddItem(65280,"Green Color",nil)
	IColumn{var_Columns:Add("C2")}:Editor:EditType := CloneType | EditType
	IColumn{var_Columns:Add("C3")}:Editor:EditType := CloneType | EditType
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("")
	var_Items:[CellValue,h,1] := 16711680
	var_Items:[CellValue,h,2] := 65280
	var_Items:[CellValue,h,3] := 255
	h := var_Items:AddItem("")
	var_Items:[CellValue,h,1] := 255
	var_Items:[CellValue,h,2] := 16711680
	var_Items:[CellValue,h,3] := 65280
oDCOCX_Exontrol1:EndUpdate()

961
Is there an easy way to get an effect like in a Microsoft Access / SQL-Server Table view, where you can scroll-up till the last row containing data is displayed as top-row

local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:ScrollBars := exVScrollEmptySpace | exBoth
oDCOCX_Exontrol1:[ScrollPos,true] := oDCOCX_Exontrol1:Items:ItemCount
oDCOCX_Exontrol1:EndUpdate()

960
Does filtering work with umlauts / accents characters
local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Names")}
	var_Column:DisplayFilterButton := true
	var_Column:FilterType := exPattern
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Mantel")
	var_Items:AddItem("Mechanik")
	var_Items:AddItem("Motor")
	var_Items:AddItem("Murks")
	var_Items:AddItem("Märchen")
	var_Items:AddItem("Möhren")
	var_Items:AddItem("Mühle")
	var_Items:AddItem("Sérigraphie")
oDCOCX_Exontrol1:Columns:[Item,0]:Filter := "*ä*"
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()

959
How FullPath method works

local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("C1")
oDCOCX_Exontrol1:Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:[CellValue,h,1] := "A"
	var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 1"),1] := "B"
	var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 2"),1] := "C"
	var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:SearchColumnIndex := 1
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:SearchColumnIndex) ))
OutputDebugString(String2Psz( oDCOCX_Exontrol1:Items:[FullPath,:[ItemByIndex,2]] ))
oDCOCX_Exontrol1:SearchColumnIndex := 0
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:SearchColumnIndex) ))
OutputDebugString(String2Psz( oDCOCX_Exontrol1:Items:[FullPath,:[ItemByIndex,2]] ))
oDCOCX_Exontrol1:EndUpdate()

958
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarHeight := 0
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Name")}:Width := 96
	IColumn{var_Columns:Add("Title")}:Width := 96
	var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
	h0 := var_Items:AddItem("Nancy Davolio")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "Seattle"
	h0 := var_Items:AddItem("Andrew Fuller")
	var_Items:[CellValue,h0,1] := "Vice President, Sales"
	var_Items:[CellValue,h0,2] := "Tacoma"
	var_Items:[SelectItem,h0] := true
	h0 := var_Items:AddItem("Janet Leverling")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "Kirkland"
	h0 := var_Items:AddItem("Margaret Peacock")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "Redmond"
	h0 := var_Items:AddItem("Steven Buchanan")
	var_Items:[CellValue,h0,1] := "Sales Manager"
	var_Items:[CellValue,h0,2] := "London"
	h0 := var_Items:AddItem("Michael Suyama")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "London"
	h0 := var_Items:AddItem("Robert King")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "London"
	h0 := var_Items:AddItem("Laura Callahan")
	var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
	var_Items:[CellValue,h0,2] := "Seattle"
	h0 := var_Items:AddItem("Anne Dodsworth")
	var_Items:[CellValue,h0,1] := "Sales Representative"
	var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:FilterBarPromptPattern := "London"
oDCOCX_Exontrol1:EndUpdate()

957
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:SetParent(Item,var_Items:[FindItem,var_Items:[CellValue,Item,"ReportsTo"],"EmployeeID",nil])
RETURN NIL

local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:Items:[ExpandItem,0] := true
oDCOCX_Exontrol1:EndUpdate()

956
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column

METHOD OCX_Exontrol1MouseDown(Button,Shift,X,Y) CLASS MainDialog
	// MouseDown event - Occurs when the user presses a mouse button.
	local i as USUAL
	i := oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]
	oDCOCX_Exontrol1:FullRowSelect := oDCOCX_Exontrol1:Columns:[Item,c]:Data
RETURN NIL

local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HeaderHeight := 22
oDCOCX_Exontrol1:HeaderAppearance := Flat
oDCOCX_Exontrol1:BackColorLock := RGB(240,240,240)
oDCOCX_Exontrol1:BackColorHeader := oDCOCX_Exontrol1:BackColorLock
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:SortBarVisible := false
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:ReadOnly := exReadOnly
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:CountLockedColumns := 1
oDCOCX_Exontrol1:AutoDrag := exAutoDragScroll
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:ColumnsAllowSizing := true
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:GridLineStyle := exGridLinesSolid
oDCOCX_Exontrol1:GridLineColor := RGB(220,220,220)
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:Columns:[Item,0]:Data := -1
oDCOCX_Exontrol1:Layout := "singlesort=" + CHR(34) + "C5:1" + CHR(34) + ";multiplesort=" + CHR(34) + " C1:2" + CHR(34) + ""
oDCOCX_Exontrol1:EndUpdate()

955
The user are not able to size the columns at runtime when using HeaderAppearance property on zero

oDCOCX_Exontrol1:VisualAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABJEIQAAYAQGKIYBkAKBQAGaAoDDcMQ5QwAAyDGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBSFDcOwHGyQZonKK3LhGCYBgIA=")
oDCOCX_Exontrol1:HeaderAppearance := 0x1000000 | 
oDCOCX_Exontrol1:Columns:Add(AsString(1))
oDCOCX_Exontrol1:Columns:Add(AsString(2))
oDCOCX_Exontrol1:Columns:Add(AsString(3))

954
Is it possible to embed the exGauge into the exGrid control

METHOD OCX_Exontrol1ItemOleEvent(Item,Ev) CLASS MainDialog
	// ItemOleEvent event - Fired when an ActiveX control hosted by an item has fired an event.
	local var_Gauge as IGauge
	local v as USUAL
	// Generate Source for 'ExGauge 1.0 Control Library(ExGauge.dll)' server from Tools\Automation Server...
	var_Gauge := IGauge{oDCOCX_Exontrol1:Items:[ItemObject,oDCOCX_Exontrol1:Items:[ItemByIndex,2]]}
		v := var_Gauge:FormatABC("date(`now`)",nil,nil,nil)
		var_Gauge:Layers:[Item,"sec"]:Value := v
		var_Gauge:Layers:[Item,"min"]:Value := v
		var_Gauge:Layers:[Item,"hour"]:Value := v
RETURN NIL

METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
	// MouseMove event - Occurs when the user moves the mouse.
	local var_Gauge as IGauge
	var_Gauge := IGauge{oDCOCX_Exontrol1:Items:[ItemObject,oDCOCX_Exontrol1:Items:[ItemByIndex,2]]}
		var_Gauge:TimerInterval := 1000
RETURN NIL

local var_Gauge as IGauge
local var_Items as IItems
local var_Layer,var_Layer1,var_Layer2,var_Layer3 as ILayer
local h,v as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:HasLines := exThinLine
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Normal Item")
	h := var_Items:AddItem("Gauge-Clock Inside")
	var_Items:[ExpandItem,h] := true
	h := var_Items:InsertControlItem(h,"Exontrol.Gauge",nil)
	var_Items:[ItemHeight,h] := 256
	var_Gauge := IGauge{var_Items:[ItemObject,h]}
		var_Gauge:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock"
		var_Gauge:[DefaultLayer,185] := 2
		var_Gauge:Layers:Count := 4
		var_Layer := var_Gauge:Layers:[Item,0]
			var_Layer:Background:Picture:Name := "vista_clock.png"
		var_Layer1 := var_Gauge:Layers:[Item,1]
			var_Layer1:Position := 3
			var_Layer1:Key := "sec"
			var_Layer1:OnDrag := 2
			var_Layer1:Selectable := false
			var_Layer1:Background:Picture:Name := "second-hand.png"
			var_Layer1:ValueToRotateAngle := "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
			var_Layer1:RotateAngleToValue := "value / 360 / 24 / 60"
		var_Layer2 := var_Gauge:Layers:[Item,2]
			var_Layer2:Position := 2
			var_Layer2:Key := "min"
			var_Layer2:OnDrag := 2
			var_Layer2:Selectable := false
			var_Layer2:Background:Picture:Name := "Minute.png"
			var_Layer2:ValueToRotateAngle := "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
			var_Layer2:RotateAngleToValue := "value / 360 / 24 / 60"
		var_Layer3 := var_Gauge:Layers:[Item,3]
			var_Layer3:Position := 1
			var_Layer3:Key := "hour"
			var_Layer3:OnDrag := 2
			var_Layer3:Background:Picture:Name := "Hour.png"
			var_Layer3:ValueToRotateAngle := "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			var_Layer3:RotateAngleToValue := "value / 360 * 0.5"
		v := var_Gauge:FormatABC("date(`now`)",nil,nil,nil)
		var_Gauge:Layers:[Item,"sec"]:Value := v
		var_Gauge:Layers:[Item,"min"]:Value := v
		var_Gauge:Layers:[Item,"hour"]:Value := v
	h := var_Items:AddItem("Normal Item")
oDCOCX_Exontrol1:EndUpdate()

953
What's the difference between merge cells and divider item

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[CellBackColor,Item,0] := RGB(240,240,240)
		var_Items:[ItemHasChildren,Item] := true
RETURN NIL

local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:TreeColumnIndex := 0
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:DrawGridLines := exAllLines
IColumn{oDCOCX_Exontrol1:Columns:Add("C1")}:FormatColumn := "1 index `A-Z`"
IColumn{oDCOCX_Exontrol1:Columns:Add("C2")}:FormatColumn := "1 index ``"
IColumn{oDCOCX_Exontrol1:Columns:Add("C3")}:FormatColumn := "1 index ``"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem(nil)
	var_Items:AddItem(nil)
	h := var_Items:AddItem(nil)
	var_Items:[CellMerge,h,0] := 1
	var_Items:[FormatCell,h,0] := "`merge cells`"
	var_Items:[CellHAlignment,h,0] := CenterAlignment
	h := var_Items:AddItem(nil)
	var_Items:[ItemDivider,h] := 0
	var_Items:[CellHAlignment,h,0] := CenterAlignment
	var_Items:[FormatCell,h,0] := "`item divider`"
	var_Items:AddItem(nil)
	var_Items:AddItem(nil)
oDCOCX_Exontrol1:EndUpdate()

952
is it possible to resize a column with the mouse without changing the width of the next column


oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
IColumn{oDCOCX_Exontrol1:Columns:Add("Column 1")}:Width := 256
IColumn{oDCOCX_Exontrol1:Columns:Add("Column 2")}:Width := 512
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:EndUpdate()

951
How do I ensure that the newly item fits the control's client area

METHOD OCX_Exontrol1ButtonClick(Item,ColIndex,Key) CLASS MainDialog
	// ButtonClick event - Occurs when user clicks on the cell's button.
	local var_Items as IItems
	local h as USUAL
	var_Items := oDCOCX_Exontrol1:Items
		h := var_Items:AddItem("")
		var_Items:[SelectItem,h] := true
		var_Items:EnsureVisibleItem(h)
	oDCOCX_Exontrol1:FocusColumnIndex := 0
RETURN NIL

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
	var_Column:AllowSizing := false
	var_Column:AllowDragging := false
	var_Column:AllowSort := false
	var_Column:Width := 24
	var_Column:[Def,exCellHasButton] := true
IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}:FormatColumn := "1 apos `A-Z`"
oDCOCX_Exontrol1:CountLockedColumns := 1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("")
	var_Items:AddItem("")
	var_Items:AddItem("")
oDCOCX_Exontrol1:EndUpdate()

950
How do I find the predefined string for giving value, or giving identifier for specified predefined caption of editor

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
	// Change event - Occurs when the user changes the cell's content.
	OutputDebugString(String2Psz( "FindItem(numeric) is " ))
	OutputDebugString(String2Psz( AsString(NewValue) ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Columns:[Item,0]:Editor:[FindItem,NewValue]) ))
RETURN NIL

local var_Column,var_Column1,var_Column2 as IColumn
local var_Editor as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("DropDownList")}
	var_Editor := var_Column:Editor
		var_Editor:EditType := DropDownListType
		var_Editor:AddItem(1,"Ken Robinson",nil)
		var_Editor:AddItem(2,"Dave Nichols",nil)
		var_Editor:AddItem(3,"Zane Thomas",nil)
		var_Editor:AddItem(4,"James Shields",nil)
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("CellValue")}
	var_Column1:FormatColumn := "%0"
	var_Column1:[Def,exCellBackColor] := 15790320
	var_Column1:[Def,exHeaderBackColor] := var_Column1:[Def,exCellBackColor]
var_Column2 := IColumn{oDCOCX_Exontrol1:Columns:Add("CellCaption")}
	var_Column2:FormatColumn := "%C0"
	var_Column2:[Def,exCellBackColor] := 15790320
	var_Column2:[Def,exHeaderBackColor] := var_Column2:[Def,exCellBackColor]
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem(1)
	var_Items:AddItem(oDCOCX_Exontrol1:Columns:[Item,0]:Editor:[FindItem,"Zane Thomas"])
	var_Items:AddItem(2)
oDCOCX_Exontrol1:EndUpdate()

949
How can I align captions of items with checkbox, with items with no checkbox

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellImages,var_Items:AddItem(0),0] := "1"
	var_Items:[CellHasCheckBox,var_Items:AddItem(1),0] := true
	var_Items:[CellImages,var_Items:AddItem(2),0] := "1"
oDCOCX_Exontrol1:EndUpdate()

948
How can I prevent sorting a column

local var_Column as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Default")}
	var_Column:[Def,exCellHasCheckBox] := true
	var_Column:PartialCheck := true
	var_Column:AllowSort := false
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()

947
Is there a possibility to group without moving and showing the column to the SortBar

local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:SortBarVisible := false
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Layout := "singlesort=" + CHR(34) + "C5:1" + CHR(34) + ";multiplesort=" + CHR(34) + " C1:2" + CHR(34) + ""
oDCOCX_Exontrol1:EndUpdate()

946
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items

METHOD OCX_Exontrol1LayoutChanged() CLASS MainDialog
	// LayoutChanged event - Occurs when column's position or column's size is changed.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

local var_Column,var_Column1 as IColumn
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := true
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column:FormatColumn := "(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))"
	var_Column:Visible := false
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column1:FormatColumn := "(1 rpos '') contains '.'"
	var_Column1:Visible := false
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C13 mod 2) != 0",nil):BackColor := RGB(240,240,240)
oDCOCX_Exontrol1:ConditionalFormats:Add("%C14 = 0",nil):BackColor := RGB(190,190,190)
oDCOCX_Exontrol1:EndUpdate()

945
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

local var_Column,var_Column1 as IColumn
local var_Editor as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HeaderAppearance := Etched
oDCOCX_Exontrol1:HeaderHeight := 24
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:DrawGridLines := exRowLines
IColumn{oDCOCX_Exontrol1:Columns:Add("Value")}:[Def,exCellValueFormat] := 1
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("FormatColumn = `%0` ~ CellValue")}
	var_Column:FormatColumn := "%0"
	var_Column:[Def,exCellSingleLine] := false
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("FormatColumn = `%C0`~ CellCaption")}
	var_Column1:FormatColumn := "%C0"
	var_Column1:[Def,exCellSingleLine] := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem(1.1234)
	var_Items:[CellValueFormat,var_Items:AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),0] := exHTML
	var_Editor := var_Items:[CellEditor,var_Items:AddItem(3),nil]
		var_Editor:EditType := CheckListType
		var_Editor:AddItem(1,"Border",nil)
		var_Editor:AddItem(2,"Thick",nil)
		var_Editor:AddItem(4,"Shadow",nil)
	var_Items:[FormatCell,var_Items:AddItem(10000),0] := "`<b>` + currency(value)"
oDCOCX_Exontrol1:EndUpdate()

944
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color

METHOD OCX_Exontrol1LayoutChanged() CLASS MainDialog
	// LayoutChanged event - Occurs when column's position or column's size is changed.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

local var_Column,var_Column1 as IColumn
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := true
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
	var_Column:Visible := false
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column1:FormatColumn := "(1 rpos '') contains '.'"
	var_Column1:Visible := false
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C13 mod 2) != 0",nil):BackColor := RGB(240,240,240)
oDCOCX_Exontrol1:ConditionalFormats:Add("%C14 = 0",nil):BackColor := RGB(190,190,190)
oDCOCX_Exontrol1:EndUpdate()

943
How can I highlight each group header, with a different background color (method 2)

METHOD OCX_Exontrol1AddGroupItem(Item) CLASS MainDialog
	// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
	oDCOCX_Exontrol1:Items:[ItemBackColor,Item] := RGB(190,190,190)
RETURN NIL

local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := true
oDCOCX_Exontrol1:EndUpdate()

942
How can I highlight each group header ( not-subroup ), with a different background color (method 1)

METHOD OCX_Exontrol1LayoutChanged() CLASS MainDialog
	// LayoutChanged event - Occurs when column's position or column's size is changed.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

local var_Column,var_Column1 as IColumn
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := true
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
	var_Column:Visible := false
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column1:FormatColumn := "(1 rpos '') contains '.'"
	var_Column1:Visible := false
oDCOCX_Exontrol1:ConditionalFormats:Add("%C14 = 0",nil):BackColor := RGB(190,190,190)
oDCOCX_Exontrol1:EndUpdate()

941
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add

METHOD OCX_Exontrol1LayoutChanged() CLASS MainDialog
	// LayoutChanged event - Occurs when column's position or column's size is changed.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

METHOD OCX_Exontrol1Sort() CLASS MainDialog
	// Sort event - Fired when the control sorts a column.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

local var_Column,var_Column1,var_Column2 as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("P1")}
	var_Column:[Def,exCellHasCheckBox] := true
	var_Column:PartialCheck := true
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("P2")}
	var_Column1:[Def,exCellHasCheckBox] := true
	var_Column1:PartialCheck := true
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root 1")
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true
	h := var_Items:AddItem("Root 2")
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true
	h := var_Items:AddItem("Root 2")
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true
var_Column2 := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column2:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
	var_Column2:Visible := false
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C2 mod 2) != 0",nil):BackColor := RGB(240,240,240)
oDCOCX_Exontrol1:EndUpdate()

940
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on

METHOD OCX_Exontrol1LayoutChanged() CLASS MainDialog
	// LayoutChanged event - Occurs when column's position or column's size is changed.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

METHOD OCX_Exontrol1Sort() CLASS MainDialog
	// Sort event - Fired when the control sorts a column.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

local var_Column as IColumn
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column:FormatColumn := "1 apos ''"
	var_Column:Visible := false
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C13 mod 5) = 1",nil):BackColor := RGB(128,128,128)
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C13 mod 5) = 2",nil):BackColor := RGB(164,164,164)
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C13 mod 5) = 3",nil):BackColor := RGB(190,190,190)
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C13 mod 5) = 4",nil):BackColor := RGB(240,240,240)
oDCOCX_Exontrol1:EndUpdate()

939
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

METHOD OCX_Exontrol1LayoutChanged() CLASS MainDialog
	// LayoutChanged event - Occurs when column's position or column's size is changed.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

METHOD OCX_Exontrol1Sort() CLASS MainDialog
	// Sort event - Fired when the control sorts a column.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

local var_Column as IColumn
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column:FormatColumn := "1 apos ''"
	var_Column:Visible := false
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C13 mod 4) = 0",nil):BackColor := RGB(240,240,240)
oDCOCX_Exontrol1:EndUpdate()

938
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

METHOD OCX_Exontrol1LayoutChanged() CLASS MainDialog
	// LayoutChanged event - Occurs when column's position or column's size is changed.
	oDCOCX_Exontrol1:Refresh()
RETURN NIL

local var_Column as IColumn
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := true
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Position")}
	var_Column:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
	var_Column:Visible := false
oDCOCX_Exontrol1:ConditionalFormats:Add("(%C13 mod 2) != 0",nil):BackColor := RGB(240,240,240)
oDCOCX_Exontrol1:EndUpdate()

937
I need to display sub-totals in the grouping items. Is there any solution on this

METHOD OCX_Exontrol1AddGroupItem(Item) CLASS MainDialog
	// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[ItemDivider,Item] := -1
		var_Items:[EnableItem,Item] := false
		var_Items:[CellValueFormat,Item,oDCOCX_Exontrol1:TreeColumnIndex] := exHTML
		var_Items:[FormatCell,Item,oDCOCX_Exontrol1:TreeColumnIndex] := "%1"
		var_Items:[CellValueFormat,Item,"Freight"] := exTotalField | exHTML
		var_Items:[CellValue,Item,"Freight"] := "sum(current,dir,%6)"
		var_Items:[FormatCell,Item,"Freight"] := "`<b>` + currency(value)"
RETURN NIL

local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelBackMode := exTransparent
oDCOCX_Exontrol1:BackColorSortBar := RGB(240,240,240)
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := SortAscending
oDCOCX_Exontrol1:LinesAtRoot := exGroupLinesOutside
oDCOCX_Exontrol1:Columns:[Item,"ShipVia"]:DisplayFilterButton := true
oDCOCX_Exontrol1:EndUpdate()

936
I use a subtotal in exTop-Item, after grouping the item shows 0. What is the solution

local var_Items as IItems
local h as USUAL
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:BackColorSortBar := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:Columns:[Item,5]:SortOrder := SortAscending
oDCOCX_Exontrol1:Columns:[Item,6]:FormatColumn := "currency(value)"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[LockedItemCount,exTop] := 1
	h := var_Items:[LockedItem,exTop,0]
	var_Items:[ItemBackColor,h] := RGB(240,240,240)
	var_Items:[CellBackColor,h,6] := RGB(190,190,190)
	var_Items:[CellValue,h,6] := "sum(all,rec,%6)"
	var_Items:[CellValueFormat,h,6] := exTotalField
oDCOCX_Exontrol1:Refresh()
oDCOCX_Exontrol1:EndUpdate()

935
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done

METHOD OCX_Exontrol1KeyPress(KeyAscii) CLASS MainDialog
	// KeyPress event - Occurs when the user presses and releases an ANSI key.
	OutputDebugString(String2Psz( "if .Editying != 0 then" ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Editing) ))
	KeyAscii := 0
RETURN NIL

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Tasks")
	var_Column := IColumn{var_Columns:Add("Date")}
		var_Column:Editor:EditType := DateType
		var_Column:Width := 128
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("Item 1"),1] := SToD("20060921")
	var_Items:[CellValue,var_Items:AddItem("Item 2"),1] := SToD("20151222")
	var_Items:[CellValue,var_Items:AddItem("Item 3"),1] := SToD("20150110")
oDCOCX_Exontrol1:EndUpdate()

934
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
METHOD OCX_Exontrol1MouseDown(Button,Shift,X,Y) CLASS MainDialog
	// MouseDown event - Occurs when the user presses a mouse button.
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))

RETURN NIL

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Buttons")}
	var_Column:Alignment := CenterAlignment
	var_Column:[Def,exCellHasButton] := true
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Button A")
	var_Items:AddItem("Button B")
	var_Items:AddItem("Button C")
oDCOCX_Exontrol1:EndUpdate()

933
How do you save the index number from a drop down to a database

local var_Column as IColumn
local var_Editor as IEditor
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
var_Column := oDCOCX_Exontrol1:Columns:[Item,"ShipVia"]
	var_Column:[Def,exCellBackColor] := 15790320
	var_Column:Position := 1
	var_Column:Width := 96
	var_Editor := var_Column:Editor
		var_Editor:EditType := DropDownListType
		var_Editor:AddItem(1,"Speedy Express",nil)
		var_Editor:AddItem(2,"United Package",nil)
		var_Editor:AddItem(3,"Federal Shipping",nil)
oDCOCX_Exontrol1:EndUpdate()

932
Is there a way to set the column width and have it stay when refreshing using the data source

local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:Layout := "gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujIAGMcj0gjcGk8QhkQgUOjUEjsfkMFAB2lEnhRihcYjUvnsykQAO8oMkTNEtGgAGUwn0uoEIhUMh0QiUOisXiE7rEyl8jAElokptYAllmpcCtMmjE3mU6jdzrUGoUKttGvFJs90oFPhVRh1Twg4wtaptco9fiMTsdIvcxw1Nkl2hUOlVwlsvnmayFAmtHnETuWm0lAv+eAGCzFK10zp1QqVUAGOvkvuuSr0YsMUi2Y0tZ4FAztt0FvuNa23Kvt2m0YnMt5No6uxwOq0eP5cGxAAxQAxgAGwAqu/q1blHDsGW49lzPUq9qtko58r8Krvc/LrPA7LWvw2ChpQ2j7Om7kBPK870hu+6ZQE4SJvmsT6u0x8BOa/iUP8jUANNATUrxAsKIFATvQU8DCL5B7dMWlr1u2gQZvgrsMMrDSyQ4vkcv02T+tEjUcyC1C7uw1kVABISgwSosXq1JLyRm9EaycqqDQuyjisu+0bvY5i3udEMjTIvkuQHFEmzHNkWymwcqtNNkIN2jUbMeGsdMm4j6R/AyZT7IcztC6M+r5Qs2yYvUx0ZOTZypBqBUZPEaMax71y6+MeTBDdBoFTjjv2z80Oi9a+VJE9HSA01SUlBbw1Ww8sPSqtFNNCdOx3L9AuQx9eVLIlUJbCa+WHVrV0fYUEMBF06UqAFh0xLLCT7abHV7P8MuNQUnW3YlDuglrfNNcVlrzV6s3FWVKMfcVrPSq6rva0wcz8+Ue2/YK+XzQ0QUQlt83/JTr2ZdiZYBKNoTm2rH4ZedzSckqGDqAA2tEk7CSQmKEJKgWMY5CmQJlkaZYsAGMY0liFJYqKIDxhSpjCu0vUBQappOgSJZUhlBtTmyJIEqaBZVljRZe8yMZnoMl4SjQRI3qal3U7OjqPpOXNFmIAadCiHIkiDV6RjOla7puFKFnjK5/ta7Z6t6GIYkqEIQ1NmqWgIA="
oDCOCX_Exontrol1:EndUpdate()

931
Is it possible to decode/view the control's Layout property

local var_Print as IExPrint

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:Columns:Add("C0")
IColumn{oDCOCX_Exontrol1:Columns:Add("C1")}:SortOrder := SortAscending
oDCOCX_Exontrol1:Columns:Add("C2")
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	OutputDebugString(String2Psz( var_Print:[Decode64TextW,oDCOCX_Exontrol1:Layout] ))
oDCOCX_Exontrol1:EndUpdate()

930
How do I programmatically sort by multiple columns


oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:Columns:Add("C0")
oDCOCX_Exontrol1:Columns:Add("C1")
oDCOCX_Exontrol1:Columns:Add("C2")
oDCOCX_Exontrol1:Layout := "multiplesort=" + CHR(34) + "C2:1 C1:2 C0:2" + CHR(34) + ""
oDCOCX_Exontrol1:EndUpdate()

929
Do you have any Fit-To-Page options when printing the control (W x T, Fit-To )

local var_Print as IExPrint
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:EndUpdate()
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	var_Print:Options := "FitToPage =2 x 1"
	var_Print:PrintExt := oDCOCX_Exontrol1
	var_Print:Preview()

928
Do you have any Fit-To-Page options when printing the control ( x T, Fit-To Tall )

local var_Print as IExPrint
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:EndUpdate()
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	var_Print:Options := "FitToPage = x 2"
	var_Print:PrintExt := oDCOCX_Exontrol1
	var_Print:Preview()

927
Do you have any Fit-To-Page options when printing the control ( W x, Fit-To Wide )

local var_Print as IExPrint
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:EndUpdate()
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	var_Print:Options := "FitToPage = 2 x"
	var_Print:PrintExt := oDCOCX_Exontrol1
	var_Print:Preview()

926
Do you have any Fit-To-Page options when printing the control ( percent view, Adjust-To )

local var_Print as IExPrint
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:EndUpdate()
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	var_Print:Options := "FitToPage = 50%"
	var_Print:PrintExt := oDCOCX_Exontrol1
	var_Print:Preview()

925
How can I get notified once the user expands a column

METHOD OCX_Exontrol1LayoutChanged() CLASS MainDialog
	// LayoutChanged event - Occurs when column's position or column's size is changed.
	OutputDebugString(String2Psz( "Column-Expanded" ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Columns:[Item,"C0"]:Expanded) ))
RETURN NIL

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:BackColorLevelHeader := oDCOCX_Exontrol1:BackColor
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("C0")}
		var_Column:ExpandColumns := "0,1,2"
		var_Column:DisplayExpandButton := true
	var_Columns:Add("C1")
	var_Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Cell 0.0")
	var_Items:[CellValue,h,1] := "Cell 0.1"
	var_Items:[CellValue,h,2] := "Cell 0.2"
	h := var_Items:AddItem("Cell 1.0")
	var_Items:[CellValue,h,1] := "Cell 1.1"
	var_Items:[CellValue,h,2] := "Cell 1.2"
oDCOCX_Exontrol1:EndUpdate()

924
I am using expandable headers, the question is how I can display the column itself, not just the child columns

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:BackColorLevelHeader := oDCOCX_Exontrol1:BackColor
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("C0")}
		var_Column:ExpandColumns := "0,1,2"
		var_Column:DisplayExpandButton := true
	var_Columns:Add("C1")
	var_Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Cell 0.0")
	var_Items:[CellValue,h,1] := "Cell 0.1"
	var_Items:[CellValue,h,2] := "Cell 0.2"
	h := var_Items:AddItem("Cell 1.0")
	var_Items:[CellValue,h,1] := "Cell 1.1"
	var_Items:[CellValue,h,2] := "Cell 1.2"
oDCOCX_Exontrol1:EndUpdate()

923
How do I layout expandable columns

local var_Column,var_Column1,var_Column2 as IColumn
local var_Columns as IColumns

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:BackColorLevelHeader := oDCOCX_Exontrol1:BackColor
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("C0")}
		var_Column:ExpandColumns := "1,2"
		var_Column:DisplayExpandButton := true
	var_Columns:Add("C1")
	var_Columns:Add("C2")
	var_Columns:Add("C3")
	var_Column1 := IColumn{var_Columns:Add("C4")}
		var_Column1:ExpandColumns := "5,6"
		var_Column1:DisplayExpandButton := true
	var_Columns:Add("C5")
	var_Column2 := IColumn{var_Columns:Add("C6")}
		var_Column2:ExpandColumns := "6,7"
		var_Column2:DisplayExpandButton := true
	var_Columns:Add("C7")
oDCOCX_Exontrol1:EndUpdate()
oDCOCX_Exontrol1:Columns:[Item,"C4"]:Expanded := false

922
How do I make the control read-only (method 2)

METHOD OCX_Exontrol1Edit(Item,ColIndex,Cancel) CLASS MainDialog
	// Edit event - Occurs just before editing the focused cell.
	Cancel := true
RETURN NIL

local var_Column as IColumn
local var_Editor,var_Editor1 as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Editor")}:Editor
	var_Editor:EditType := CheckListType
	var_Editor:AddItem(1,"One",nil)
	var_Editor:AddItem(2,"Two",nil)
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}
	var_Editor1 := var_Column:Editor
		var_Editor1:EditType := CheckValueType
		var_Editor1:[Option,exCheckValue1] := 2
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem(1),1] := 0
	var_Items:[CellValue,var_Items:AddItem(2),1] := 1
oDCOCX_Exontrol1:EndUpdate()

921
How do I set a locked check-box

local var_Column,var_Column1 as IColumn
local var_Editor,var_Editor1 as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Locked-Check")}
	var_Editor := var_Column:Editor
		var_Editor:EditType := CheckValueType
		var_Editor:[Option,exCheckValue1] := 2
		var_Editor:Locked := true
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Unlocked-Check")}
	var_Editor1 := var_Column1:Editor
		var_Editor1:EditType := CheckValueType
		var_Editor1:[Option,exCheckValue2] := 1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem(1),1] := 0
	var_Items:[CellValue,var_Items:AddItem(0),1] := 1
oDCOCX_Exontrol1:EndUpdate()

920
Does the title of the cell's tooltip supports HTML format

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
	var_Column:Caption := ""
	var_Column:HTMLCaption := "Column"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellToolTip,var_Items:AddItem("tooltip w/h different title"),0] := "<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the title centered with a different color."
oDCOCX_Exontrol1:EndUpdate()

919
How do I specify a different title for the cell's tooltip

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
	var_Column:Caption := "This is the title"
	var_Column:HTMLCaption := "Column"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellToolTip,var_Items:AddItem("tooltip w/h different title"),0] := "This is bit of text that's shown when the user hovers the cell."
oDCOCX_Exontrol1:EndUpdate()

918
The cell's tooltip displays the column's caption in its title. How can I get ride of that

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("C1")
	var_Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("tooltip w/h caption")
	var_Items:[CellToolTip,h,0] := "This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title."
	var_Items:[CellValue,h,1] := "tooltip no caption"
	var_Items:[CellToolTip,h,1] := "This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title."
var_Column := oDCOCX_Exontrol1:Columns:[Item,"C2"]
	var_Column:HTMLCaption := var_Column:Caption
	var_Column:Caption := ""
oDCOCX_Exontrol1:EndUpdate()

917
How can I programmatically show the column's filter

METHOD OCX_Exontrol1RClick() CLASS MainDialog
	// RClick event - Fired when right mouse button is clicked
	local i as USUAL
	i := oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]
	oDCOCX_Exontrol1:Columns:[Item,c]:ShowFilter("-1,-1,128,128")
RETURN NIL

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ShowFocusRect := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Items ")}
	var_Column:DisplayFilterPattern := false
	var_Column:FilterList := exShowExclude | exShowFocusItem | exShowCheckBox
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:AddItem("Item 2")
	var_Items:AddItem("Item 3")
oDCOCX_Exontrol1:EndUpdate()

916
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

METHOD OCX_Exontrol1ColumnClick(Column) CLASS MainDialog
	// ColumnClick event - Fired after the user clicks on column's header.
	// Column.SortOrder = 1
	oDCOCX_Exontrol1:SortOnClick := exDefaultSort
	oDCOCX_Exontrol1:Columns:[Item,"Sort"]:SortOrder := SortAscending
	oDCOCX_Exontrol1:SortOnClick := exUserSort
RETURN NIL

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SortOnClick := exUserSort
oDCOCX_Exontrol1:Columns:Add("Items")
IColumn{oDCOCX_Exontrol1:Columns:Add("Sort")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("Item 1 (3)"),1] := 3
	var_Items:[CellValue,var_Items:AddItem("Item 2 (1)"),1] := 1
	var_Items:[CellValue,var_Items:AddItem("Item 3 (2)"),1] := 2
oDCOCX_Exontrol1:EndUpdate()

915
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

METHOD OCX_Exontrol1ColumnClick(Column) CLASS MainDialog
	// ColumnClick event - Fired after the user clicks on column's header.
	// Column.SortOrder = 1
	oDCOCX_Exontrol1:Items:SortChildren(0,"Sort",true)
RETURN NIL

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SortOnClick := exUserSort
oDCOCX_Exontrol1:Columns:Add("Items")
IColumn{oDCOCX_Exontrol1:Columns:Add("Sort")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("Item 1 (3)"),1] := 3
	var_Items:[CellValue,var_Items:AddItem("Item 2 (1)"),1] := 1
	var_Items:[CellValue,var_Items:AddItem("Item 3 (2)"),1] := 2
oDCOCX_Exontrol1:EndUpdate()

914
How can I highlight the cell's button with a different appearance, when cursor hovers it

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:VisualAppearance:Add(1,"c:\exontrol\images\normal.ebn")
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:SelForeColor := RGB(0,0,0)
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:[Background,exCursorHoverCellButton] := 0x1000000
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Buttons")}
	var_Column:[Def,exCellHasButton] := true
	var_Column:[Def,exCellValueFormat] := 1
	var_Column:Alignment := CenterAlignment
	var_Column:HeaderAlignment := CenterAlignment
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Button <b>1</b>")
	var_Items:AddItem("Button <b>2</b>")
	var_Items:AddItem("Button <b>3</b>")
oDCOCX_Exontrol1:EndUpdate()

913
How can I prevent highlighting the cell's button while cursor hovers it

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[CellValue,Item,0] := "Button <b>A</b>"
		var_Items:[CellValue,Item,1] := "Button <b>B</b>"
RETURN NIL

local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:SelForeColor := RGB(0,0,0)
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:[Background,exCursorHoverCellButton] := -1
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("A")}
	var_Column:[Def,exCellHasButton] := true
	var_Column:[Def,exCellValueFormat] := 1
	var_Column:Alignment := CenterAlignment
	var_Column:HeaderAlignment := CenterAlignment
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("B")}
	var_Column1:[Def,exCellHasButton] := true
	var_Column1:[Def,exCellValueFormat] := 1
	var_Column1:Alignment := CenterAlignment
	var_Column1:HeaderAlignment := CenterAlignment
IColumn{oDCOCX_Exontrol1:Columns:Add("")}:Position := 1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellEnabled,var_Items:AddItem(""),1] := false
	var_Items:AddItem("")
	var_Items:AddItem("")
oDCOCX_Exontrol1:EndUpdate()

912
How can I change the image of the icon while performing OLE Drag and Drop

METHOD OCX_Exontrol1OLEStartDrag(Data,AllowedEffects) CLASS MainDialog
	// OLEStartDrag event - Occurs when the OLEDrag method is called.
	// Data.SetData("your data to drag")
	AllowedEffects := 2
RETURN NIL

local var_Appearance as IAppearance
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:OLEDropMode := exOLEDropManual
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:HeaderHeight := oDCOCX_Exontrol1:DefaultItemHeight
IColumn{oDCOCX_Exontrol1:Columns:Add("Default")}:Width := 128
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:AddItem("Item 2")
	var_Items:AddItem("Item 3")
	var_Items:AddItem("Item 4")
	var_Items:AddItem("Item 5")
var_Appearance := oDCOCX_Exontrol1:VisualAppearance
	var_Appearance:Add(1,"gBFLBCJwBAEHhEJAAChABakMACAADACAxRDQNABQKAAzQFAYaBiG6GAAGEaRYgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjHLUXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQIhsC4JUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU8lORLUi+M4zSBPcZVTRtGShPDBKTjMLaYgkIIlVpRNa0PC1GTzQ6mazkKQLRADDIDVbAeL3LiMBy9LyLLItQALByua5mWhbcZyBCOPgBTrRb5zO58FjuTK7YLjMB7NrUNYtFaUMy2OpOCADIaecTNcaWLxPF2MY1HWYxVj2Jw3DuRJonKYB5lKAYkkYdA6hyDIjBkApaFoAAhBMfYxiGNAkFECZnm4YQBgiOgDl2URSE4KAEj2AJKigFgGgGYIIAyPQ6CCRogAAOxhAMSgSDgIRDhYFoFmGCBmBQOAMjgdgQDsUITEIIg5iISAEmIOBigiJgqgqYhoFyVILyyMgyDmYxDg4rBjgiZg6g0Dh4kiTIMGMKAwmgOQkEkFhGhGZIJAoPoQAyQ4mE6BhlAkRgXhODoZC0A4Pg6KRmCSFplkkdheDmJYTioVgACOY4uGaDwmgmJhqg8JlWmOGRmGkChyhyZxJAobYbmMI4yHqFQnkmdh+2RYp4DMIZ5gaBohmiCYGB+IJOmoNhtiPXZGG2I1tgyb4lmgGhmhqJt0Fyb4gk8CtsCiahKhYH4oXiAohiUKpKjaLt+goDJxiyaZqlaNot4OTJx3gKp2iiL5sAsBoov+KgMnOMZrisJpKjLjocnPeBLEaRI0m0SxWkSNBPEoDJ1jabJrHaXo35obOZC2OximaOZugsYpi3ga42mKO5vAuRpijsTxqAyd49m8S5mnqPuqFyd4gk+DAGn6QJwEwFp+kAT+BnmQpwgwNwOkPtYsnnrgsFcEpFnGDBnBKRRPiwUwckecgMgcIpHGMKQwnuSZygyJ1/HKOgMnyS5zAyRwykycw5g4Eg0jCA57DqTpzkydw+kIDR9AUCY9A2HQXBIUh0g0JRJ5aUxmnQZIPnkUgvDUI5tFcVoPjUOB+A4QBAICA")
	var_Appearance:Add(2,"gBFLBCJwBAEHhEJAAChABC8MACAADACAxRDQNABQKAAzQFAYaBiG6GAAGEaRYgmFgAQhFcZQSKUOQTDKMIziaQIRDINQlSTJcQjKKEUQTFiXIyAKKwEgmEQMQiCcbzXIUBxAAqXZZFUaKAgOMJDTLBAzUTCQbR7HiQYyBeCQOo+VoaSACEIlAZJRjoOo5DJGGQILlQJqyYrpaAxIgkEJuTqGoQaXgle53PJeLpXW5Nez9P7AMBwK7bbaqeTyXa+eDtJhif4cXjIMhyLI8UxXEKOL7jDSYPgqK48QhCEJQPQ9EyXJqnahoemCeRXBZ+aqxbBsCwCep0YBeNr3HaNaz3PK/brtWxMDpeA5IYhhF7WdZFR4tMrOdAtHL9FyPJ5TFicgXnoTAKAsRpHPeVhrAUd4LkmY5yj+fQ+i8L4zk+Y5vjCe4oD6ZoNhSRxiisVRKg+T5vnWfB6h6J5yAIf4fieWJFHyHZHHSTAygyAociMKBKEKBIeCiCZyHYFAnCAB4mBeBQJlgRIegOCgYCySAgh2WAkgINAMmMNIgCcCYoGYLoLmKaIshqCgMliEICgmDRDEiUQmkmAhWDCD5inicIVg4TQYloJg2g2ExYhoJZJEidIThMCQSFyEwkGKaRKFEJQJBkOhLCUJIDFoRiKBmBJhDeDZZDoPAlgmQhghaGZimmHhphqZopDoYw3GYEgFgGHROGOFJkCSSQCDoTAkiSaQ6C6IBJFkPIUCSJ5CDoeQ5CcVZ5gWHROmONJsCMSISByEFyjIRoYiaKYaG6HonEiOhcguJQIHoRJsh0WBWB2JIpiqShKi0OwqnqRouiyTpGhGBxiYIZKOhqGp2j4aRaAqZL3FAECAgA==")
oDCOCX_Exontrol1:[Background,exDragDropBefore] := 0x1000000
oDCOCX_Exontrol1:[Background,exDragDropAfter] := 0x2000000
oDCOCX_Exontrol1:[Background,exDragDropForeColor] := RGB(0,0,1)
oDCOCX_Exontrol1:EndUpdate()

911
How can I sort by two-columns, one by date and one by time

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSort := false
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Index")}:FormatColumn := "1 index ``"
	IColumn{var_Columns:Add("Date")}:SortType := SortDate
	var_Column := IColumn{var_Columns:Add("Time")}
		var_Column:SortType := SortTime
		var_Column:FormatColumn := "time(value)"
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20010101")
	var_Items:[CellValue,h,2] := SToD("20010101 10:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20001231")
	var_Items:[CellValue,h,2] := SToD("20010101 10:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20010101")
	var_Items:[CellValue,h,2] := SToD("20010101 06:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20001231")
	var_Items:[CellValue,h,2] := SToD("20010101 08:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20010101")
	var_Items:[CellValue,h,2] := SToD("20010101 08:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20001231")
	var_Items:[CellValue,h,2] := SToD("20010101 06:00:00")
oDCOCX_Exontrol1:Layout := "multiplesort=" + CHR(34) + "C1:1 C2:1" + CHR(34) + ""
oDCOCX_Exontrol1:EndUpdate()

910
How can I display a context menu

METHOD OCX_Exontrol1MouseUp(Button,Shift,X,Y) CLASS MainDialog
	// MouseUp event - Occurs when the user releases a mouse button.
	local var_ExContextMenu as IExContextMenu
	// Generate Source for 'ExContextMenu 1.0 Type Library(ExContextMenu.dll)' server from Tools\Automation Server...
	var_ExContextMenu := IExContextMenu{"Exontrol.ContextMenu"}
		var_ExContextMenu:Items:ToString := "Check[chk],[sep],Item 1,Item 2,Item 3"
		OutputDebugString(String2Psz( AsString(var_ExContextMenu:Select(nil,nil,nil)) ))
RETURN NIL

local rs as _Recordset

oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:ReadOnly := exReadOnly

909
Also, are there any plans on the ability to put borders on individual cells or rows or columns

local var_Appearance as IAppearance
local var_Items as IItems
local h,hx as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Appearance := oDCOCX_Exontrol1:VisualAppearance
	var_Appearance:Add(1,"gBFLBCJwBAEHhEJAAChABOUGACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYRhkEYgEiONoaDJCM4wHIMQxHCKTZRkGYpajOPobUbGUywHRcRRvH6EZQGWg6GjqK43SCEEZhJBNGyTJ6BZbGURbCqSLAwWZAYy2RCMRxDJqLKypSwKPoGKosS5OUwzHItaRtHaJJAwKZ6ApGQpRVTAYxVfC1PzkACma4nS7oXraVJFVZTdYwTh+JABTzGLpnKw7FhGa5pABpdq0RTuOZdAbPMoyXBrXqqB46UCOGg5HRWWwHR7ZIquap9JzfCq5cRbWr5BBOPaBYKwdD1CB+iMVRnlQRY4hafZwAMH5Pl4XQnjCEBECSIBpDGHQOicIwtBIBpmiWEIJj6eJQloEgomafgyGGCI6kKYZQH+igGAKAJgEgFgGgGYIFlCf4CmCSA2A6A5hAgRgEgQYRIFYFIEmEaBmBmBghigdgQgcIZogYC4ICIKB6CSCRhiiHgogWIooi4F4AmKaIaDCDBihiTg0gsIIYmYOoOmOSJ2D6AZQBAgI=")
	var_Appearance:Add(2,"gBFLBCJwBAEHhEJAAChABdUIQAAYAQGKIaBoAKBQAGaAoDDYMg1QwAAxDGLEEwsACEIrjKCVIgkHYJRjGEZxNCMIhiGAaQChEZYHgkMomDAOEgyHKcEgJGyEQgkOa4ajCKYrSzAcrwTI4cRVHiQZygOZ4DBSOY8VBAcQweItJhrKqVRgriitNQjCyjZCpOaIDooAJmRZNNISBBIEQSKA0TDOQ5TSKUMYhOZTBBEbbMNBtBIUIRpajbMBiFywUxUOJYXhmG4dR7IMhyLI8UxXFo7P7mOZZXjmO49T7Kc70LQ9CyHJKnabpWoaXj2VZZV7Mda2DTNSzPKK1bZpG4bTouKZ5WjfN72fgeCzrF7HchyPJcXxnG4ZAMBA")
	var_Appearance:Add(3,"gBFLBCJwBAEHhEJAAChABL0GACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgEgmEQxDANIBQSKoaQiGQYRhkEYpFiONoXDJCM4wHIMQxHCKTZRkGYpajOPobUbGUygBRdExvEyEZQGWg6GjqK43SCEEZhJBNGyfH6dBpEWT7ChENQwWLLFoRDIcQyXCytIDter4boGKosS5OUwzGAtaRvHaJJAwKZ6ApGQpRVTAYxUdC1HTjJiEa4nS7oXraVJFVZTdYwTh+JABTzGKbsSycKqWaqkABZeoWbTuOZdAbPMoyXBrXgOLYzUCOGg5HRWWwHR7ZIq0Pg9Hqaa4bVbIVxbcAGH6BQa6J5hEBECSIBpDGHQOicIwtBIBpmhqEIJj2eJQloEgokiegyGGCI6kKZ5BnefA+D8L4flOa52nufg+g+f5fnPFB/ooBZ1omSAWASAJgGgJgJgIIIoDYAIDCCaBFnuBAhCgOgUgUYIoF4GIBiGKBuAcfohmgNgdggX54g4JB/F+GImCqCpikiNguguUAQICA=")
	var_Appearance:Add(4,"gBFLBCJwBAEHhEJAAChABBUGACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgCgmEQxDANMiwGKoaQiGQYRhkEYgFiONoaDJCM4wHIMQxHCKTZRkGYpajOPobUbAYQQSAkEgpECbZqoEZaDoaOorTZINJ0VR1Ox5KKfZyGURZPqOEQ1DBZEI2RZUbxDJquLhACj7AjeZZtRJZVp2TY9eQ3LC3aYhGqwAwSFpJVjUEBgRBJIDSMY6DpOIxaEgNZpwEITOTxUK0EhRLy5agDCJ1QrCdanahqOpaXpmW5dV7YNh2LTnfzXNq3bhuO5bXqOd59X7fN54Dg+D4LRLHbpxXIcXqvFaZZDnOb4ToPEuAZUmqcB2B2DoHGuN5Tm6d46lsPwfhOS5mnOeg9DqCAIICA")
oDCOCX_Exontrol1:LinesAtRoot := exGroupLinesAtRoot
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:Columns:Add("")
IColumn{oDCOCX_Exontrol1:Columns:Add("")}:[Def,exCellBackColor] := 33554432
oDCOCX_Exontrol1:Columns:Add("")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root 1")
	var_Items:[ItemBackColor,h] := 0x1000000
	hx := var_Items:[SplitCell,h,0]
	var_Items:[CellValue,0,hx] := "count(current,dir,1)"
	var_Items:[CellValueFormat,0,hx] := exTotalField
	var_Items:[FormatCell,0,hx] := "'Childs: ' + value"
	var_Items:[CellBackColor,0,hx] := 0x3000000
	var_Items:[CellHAlignment,0,hx] := CenterAlignment
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true
	h := var_Items:AddItem("Root 2")
	var_Items:[ItemBackColor,h] := 0x4000000
	hx := var_Items:[SplitCell,h,0]
	var_Items:[CellValue,0,hx] := "count(current,dir,1)"
	var_Items:[CellValueFormat,0,hx] := exTotalField
	var_Items:[FormatCell,0,hx] := "'Childs: ' + value"
	var_Items:[CellBackColor,0,hx] := 0x3000000
	var_Items:[CellHAlignment,0,hx] := CenterAlignment
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:InsertItem(h,nil,"Child 3")
	var_Items:[ItemBackColor,var_Items:InsertItem(h,nil,"Child 4")] := 0x4000000
oDCOCX_Exontrol1:EndUpdate()

908
How can I decode the Layout property
local var_Columns as IColumns
local var_Print as IExPrint
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("C1")
	IColumn{var_Columns:Add("C2")}:Position := 1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("SubItem 1.1"),1] := "SubItem 1.2"
	var_Items:[CellValue,var_Items:AddItem("SubItem 2.1"),1] := "SubItem 2.2"
oDCOCX_Exontrol1:Columns:[Item,"C2"]:SortOrder := SortDescending
oDCOCX_Exontrol1:EndUpdate()
OutputDebugString(String2Psz( "Encoded:" ))
OutputDebugString(String2Psz( oDCOCX_Exontrol1:Layout ))
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	OutputDebugString(String2Psz( "Decoded: " ))
	OutputDebugString(String2Psz( var_Print:[Decode64TextW,oDCOCX_Exontrol1:Layout] ))

907
No new line is shown if using <br> tag. How can I show a new line with-in the cell

local var_Column,var_Column1 as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:DrawGridLines := exRowLines
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Single-Line")}
	var_Column:[Def,exCellSingleLine] := true
	var_Column:[Def,exCellValueFormat] := 1
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Multiple-Lines")}
	var_Column1:[Def,exCellSingleLine] := false
	var_Column1:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("First-Line<br>Second-Line"),1] := "First-Line<br>Second-Line"
	h := var_Items:AddItem("First-Line<br>Second-Line<br>Third-Line")
	var_Items:[CellSingleLine,h,nil] := exCaptionWordWrap
	var_Items:[CellHAlignment,h,0] := CenterAlignment
	var_Items:[ItemDivider,h] := 0
oDCOCX_Exontrol1:EndUpdate()

906
I am using exCRD to layout the columns in the grid, but is there a way where I can have the text in a cell wrap if it's exceeds the width of the cell instead of showing the ...'s

local var_Column,var_Column1,var_Column2,var_Column3,var_Column4 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:DefaultItemHeight := 36
oDCOCX_Exontrol1:FullRowSelect := exColumnSel
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("Column1")}
		var_Column:Visible := false
		var_Column:Editor:EditType := EditType
	var_Column1 := IColumn{var_Columns:Add("Column2")}
		var_Column1:Visible := false
		var_Column1:Editor:EditType := EditType
	var_Column2 := IColumn{var_Columns:Add("Column3")}
		var_Column2:Visible := false
		var_Column2:[Def,exCellSingleLine] := false
		var_Column2:Editor:EditType := EditType
	var_Column3 := IColumn{var_Columns:Add("Column4")}
		var_Column3:Alignment := CenterAlignment
		var_Column3:HeaderAlignment := CenterAlignment
		var_Column3:Visible := false
		var_Column3:[Def,exCellHasButton] := true
		var_Column3:[Def,exCellButtonAutoWidth] := true
	var_Column4 := IColumn{var_Columns:Add("FormatLevel")}
		var_Column4:FormatLevel := "(0/1)," + CHR(34) + "Information to be shown on the control's header" + CHR(34) + "[a=17][ww]:128,3:128"
		var_Column4:[Def,exCellFormatLevel] := "(0/1),2[a=17][ww]:128,3:128"
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Cell 1.1")
	var_Items:[CellValue,h,1] := "Cell 1.2"
	var_Items:[CellValue,h,2] := "This is just a bit of information on first row"
	var_Items:[CellValue,h,3] := "Cell 1.4"
	var_Items:[CellSingleLine,h,3] := exCaptionWordWrap
	h := var_Items:AddItem("Cell 2.1")
	var_Items:[CellValue,h,1] := "Cell 2.2"
	var_Items:[CellValue,h,2] := "This is just a bit of information on second row"
	var_Items:[CellValue,h,3] := "Cell 2.4"
oDCOCX_Exontrol1:EndUpdate()

905
How can I load pictures using URL ( http:// )
local http as IHTTP

// Generate Source for 'ExHTTP 1.0 Control Library(ExHTTP.dll)' server from Tools\Automation Server...
http := IHTTP{"Exontrol.HTTP"}
oDCOCX_Exontrol1:PictureDisplay := LowerRight
oDCOCX_Exontrol1:Picture := http:[GETImage,"http://mail.exontrol.com/images/exontrol.png"]

904
How can I filter programmatically by multiple columns
local var_Column,var_Column1,var_Column2,var_Column3 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Name")
	var_Column := IColumn{var_Columns:Add("Active")}
		var_Column:[Def,exCellHasCheckBox] := true
		var_Column:DisplayFilterButton := true
	var_Columns:Add("Type")
	IColumn{var_Columns:Add("Mode")}:FilterType := exFilter
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Item A")
	var_Items:[CellState,h,1] := 1
	var_Items:[CellValue,h,2] := "A"
	h := var_Items:AddItem("Item B")
	var_Items:[CellState,h,1] := 0
	var_Items:[CellValue,h,2] := "B"
	h := var_Items:AddItem("Item C")
	var_Items:[CellState,h,1] := 1
	var_Items:[CellValue,h,2] := "C"
	var_Items:[CellValue,h,3] := "None"
	h := var_Items:AddItem("Item D")
	var_Items:[CellState,h,1] := 1
	var_Items:[CellValue,h,2] := "C"
var_Column1 := oDCOCX_Exontrol1:Columns:[Item,1]
	var_Column1:FilterType := exCheck
	var_Column1:Filter := AsString(1)
var_Column2 := oDCOCX_Exontrol1:Columns:[Item,2]
	var_Column2:FilterType := exFilter
	var_Column2:Filter := "C"
var_Column3 := oDCOCX_Exontrol1:Columns:[Item,3]
	var_Column3:FilterType := exNonBlanks
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()

903
How can I add Right-To-Left Reading-Order / RTL Layout
local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:TreeColumnIndex := -1
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("RTL - Header Caption")}
	var_Column:HeaderAlignment := 0x20000 | RightAlignment
	var_Column:Alignment := 0x20000 | RightAlignment
oDCOCX_Exontrol1:FullRowSelect := exColumnSel
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("RTL - Text Right")
	var_Items:[CellHAlignment,var_Items:AddItem("RTL - Text Center"),0] := 0x20000 | CenterAlignment
	var_Items:[CellHAlignment,var_Items:AddItem("RTL - Text Left"),0] := 0x20000 | 
oDCOCX_Exontrol1:EndUpdate()

902
I have applied ebn to the grid using the following code, and noticed that it applies to the filter dropdownList too. Is there a way to prevent this behavior, like keeping the Filter dropdownlist intact

local var_Items as IItems

oDCOCX_Exontrol1:VisualAppearance:Add(1,"c:\exontrol\images\normal.ebn")
oDCOCX_Exontrol1:Appearance := 0x1000000 | 
oDCOCX_Exontrol1:BackColorHeader := 0x1000000
oDCOCX_Exontrol1:[Background,exBackColorFilter] := 0x8000000f
IColumn{oDCOCX_Exontrol1:Columns:Add("Filter")}:DisplayFilterButton := true
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:AddItem("Item 2")

901
The tree lines from the group parent to its children are missing and no identation is present: the parent and all its children are on the same offset from left. What canbe done

METHOD OCX_Exontrol1AddGroupItem(Item) CLASS MainDialog
	// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
	local var_Items as IItems
	local nGroupColumn as USUAL
	var_Items := oDCOCX_Exontrol1:Items
		nGroupColumn := var_Items:[GroupItem,Item]
		var_Items:[ItemDivider,Item] := -1
		var_Items:[FormatCell,Item,0] := var_Items:[FormatCell,Item,nGroupColumn]
		var_Items:[CellValue,Item,0] := oDCOCX_Exontrol1:Columns:[Item,nGroupColumn]:GroupByTotalField
		var_Items:[CellValueFormat,Item,0] := var_Items:[CellValueFormat,Item,nGroupColumn]
RETURN NIL

local var_Column as IColumn
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ReadOnly := exReadOnly
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
oDCOCX_Exontrol1:AllowGroupBy := true
var_Column := oDCOCX_Exontrol1:Columns:[Item,0]
	var_Column:AllowGroupBy := false
	var_Column:Width := 96
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := SortAscending
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:EndUpdate()